
var sliderWidth = 375; // 需要设置slider的宽度，用于计算中间位置
// pages/shop_info/index.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    shopImg: "http://new.sztc.com//u/cms/sgz/201810/160936325s9d.png",
    shopDescribeContent: "产品标题—加厚A4打印纸大撒否打印喷墨激光厚合同标...",
    shopPrice: "¥ 500.00",
    shopInfoDate: "上架：2018-10-10",
    shopStock: "库存：100",
    shopSalesNum: "销量：500",
    navbar_bars:["商品详情", "订单统计", "商品评价"],
    activeIndex: 0,
    sliderOffset: 0,
    sliderLeft: 13,
    grids: [5, 10, 5, 5000.00, 1000.00, 5000000.00],
    evaScoreList:[{
      evaItemTitle:"服务态度",
      evaItemScore:4.8,
      evaItemProcess:80,
      evaItemDesc:"高于同行+0.55%"
    }, {
        evaItemTitle: "工作速度",
        evaItemScore: 4.2,
        evaItemProcess: 60,
        evaItemDesc: "低于同行-0.56%"
      }, {
        evaItemTitle: "服务态度",
        evaItemScore: 4.5,
        evaItemProcess: 70,
        evaItemDesc: "持平同行"
      }],
    statisticsSum:[5,4,3,2,1],
    statisticsProcess:[
      {
        processWidth:2,
        processSum:0
      },
      {
        processWidth: 40,
        processSum: 10,
      },
      {
        processWidth: 100,
        processSum: 25,
      },
      {
        processWidth: 70,
        processSum: 35,
      },
      {
        processWidth: 70,
        processSum: 35,
      }
    ],
    orderList:[{
        orderTitle:"今日订单数",
        orderNum:5
      }, 
      {
        orderTitle: "昨日订单数",
        orderNum: 10
      },
      {
        orderTitle: "总订单数",
        orderNum: 10
      },
      {
        orderTitle: "今日成交额",
        orderNum: 5000.00
      },
      {
        orderTitle: "昨日成交额",
        orderNum: 10000.00
      },
      {
        orderTitle: "总成交额",
        orderNum: 50000.00
      }
    ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  },

  tabClick: function (e) {
    this.setData({
      sliderOffset: e.currentTarget.offsetLeft,
      activeIndex: e.currentTarget.id
    });
  }
})